#pragma once

#include "HttpRequestMethod.h"
#include "Containers/Map.h"

class CHttpIncomingRequest
{
public:
    //parse a http request string, return nullptr if failed
    static std::shared_ptr<CHttpIncomingRequest> Parse(const CString &InRequestString);

    CHttpIncomingRequest()=default;
    ~CHttpIncomingRequest()=default;

    EHttpRequestMethod Method;
    CString Version;
    CString ResoucePath;
    TMap<CString, CString> UrlParameters;

    TMap<CString, CString> Headers;

    CString Body;
};